import 'package:azlistview/azlistview.dart';
import 'package:tencent_im_sdk_plugin/models/v2_tim_user_full_info.dart';

class UserMember extends ISuspensionBean{
  late String userId;
  String? userName;
  String? nickName;
  String? avatar;
  String? tagIndex;
  String? namePinyin;
  V2TimUserFullInfo? userProfile;

  UserMember({required this.userId, this.userName, this.nickName, this.avatar});

  UserMember.fromJson(Map<String, dynamic> json) {
    userId = "${json['userId']}";
    userName = json['userName'];
    nickName = json['nickName'];
    avatar = json['avatar'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['userId'] = this.userId;
    data['userName'] = this.userName;
    data['nickName'] = this.nickName;
    data['avatar'] = this.avatar;
    return data;
  }

  @override
  String toString() {
    return 'UserMember{userId: $userId, userName: $userName, nickName: $nickName, avatar: $avatar}';
  }

  @override
  String getSuspensionTag() {
    return "$tagIndex";
  }
}
